/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tcpserver;

/**
 *
 * @author makkalot

 */
import java.io.*;
import java.net.*;


public abstract  class GeneralTcpClient {
    
    protected Socket kksocket = null;
    protected BufferedOutputStream bout = null; // to send to server
    protected DataOutputStream out = null;
    protected DataInputStream in =null;
    
    public GeneralTcpClient() throws IOException,SocketException{
        
        kksocket = new Socket("localhost",GeneralTcpServer.bindPort);//connect to server
        //bout = new BufferedOutputStream(kksocket.getOutputStream()); //write bytes to that one
        out = new DataOutputStream(kksocket.getOutputStream());
        in = new DataInputStream((kksocket.getInputStream())); // you can read from server
        
        System.out.println("Client attached to server");
    
    }
    
    
    public abstract void sendData(String filename);

}
